package cn.stylefeng.guns.modular.business.neo4j.entity;

import cn.stylefeng.guns.modular.business.neo4j.relationship.ReDynasty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.neo4j.core.schema.GeneratedValue;
import org.springframework.data.neo4j.core.schema.Id;
import org.springframework.data.neo4j.core.schema.Node;
import org.springframework.data.neo4j.core.schema.Relationship;

import java.util.ArrayList;
import java.util.List;

@Node
public class Dynasty  {
    @Id
    @GeneratedValue
    private Long id;
//    @ApiModelProperty("名称ID")
    private String indexId;
//    @ApiModelProperty("名称")
    private String title;

    @Relationship(type = "DYNASTY_IN", direction = Relationship.Direction.INCOMING)
    private List<ReDynasty> reDynastyList = new ArrayList<>();

    public Dynasty() {
    }

    public Dynasty(String indexId, String title) {
        this.indexId = indexId;
        this.title = title;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getIndexId() {
        return indexId;
    }

    public void setIndexId(String indexId) {
        this.indexId = indexId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<ReDynasty> getReDynastyList() {
        return reDynastyList;
    }

    public void setReDynastyList(List<ReDynasty> reDynastyList) {
        this.reDynastyList = reDynastyList;
    }
}
